<template>
  <div class="page">
    <div class="title">校园二手交易系统</div>
    <div class="title2">---- 专注于校园交易 ----</div>
    <div class="div3">
      <div v-for="(item, index) in imglist" :key="index">
        <img class="img" :src="item.imgurl" alt="加载中"  @click="godetail(index)">
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'Index',
  data () {
    return {
      imglist: [
        {
          imgurl: '/static/images/shool1.png'
        },
        {
          imgurl: '/static/images/shool2.png'
        },
        {
          imgurl: '/static/images/shool3.png'
        }
      ]
    }
  },
  created () {
  },
  methods: {
    godetail (index) {
      if (index === 0) {
        this.$router.push({path: '/campussecond'})
      } else if (index === 1) {
        this.$router.push({path: '/campuswantbuy'})
      } else {
        this.$router.push({path: '/jion'})
      }
    }
  }
}
</script>
<style scoped>
.page {
  height: 755px;
  background-size: 100% 100%;
  background-attachment: fixed;
  background-image: url("/static/images/background.jpg");
  background-repeat: no-repeat;
}
.title{
  font-size: 60px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  padding: 100px 0 20px 0;
  letter-spacing: 30px;
}
.title2{
  font-size: 40px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  padding: 10px 0 100px 0;

}
.div3 {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: nowrap;
}
.img {
  width: 400px;
  height: 400px;
  margin-right: 10px;
}
</style>
